package com.uls.questionnaire.domain;

import java.math.BigDecimal;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.uls.common.annotation.Excel;
import com.uls.common.core.domain.BaseEntity;

/**
 * 问卷结果统计对象 zxh_questionnaire_statistics
 * 
 * @author zxh
 * @date 2024-11-23
 */
public class QuestionnaireStatistics extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 统计记录的唯一标识符 */
    private Long id;

    /** 问卷id */
    @Excel(name = "问卷id")
    private Long questionnaireId;

    /** 问题id */
    @Excel(name = "问题id")
    private Long questionId;

    /** 选项的文本内容（对于文本问题，此字段可能为空） */
    @Excel(name = "选项的文本内容", readConverterExp = "对于文本问题，此字段可能为空")
    private String optionText;

    /** 该选项被选择的次数 */
    @Excel(name = "该选项被选择的次数")
    private Long responseCount;

    /** 该选项被选择的百分比 */
    @Excel(name = "该选项被选择的百分比")
    private BigDecimal percentage;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setQuestionnaireId(Long questionnaireId) 
    {
        this.questionnaireId = questionnaireId;
    }

    public Long getQuestionnaireId() 
    {
        return questionnaireId;
    }
    public void setQuestionId(Long questionId) 
    {
        this.questionId = questionId;
    }

    public Long getQuestionId() 
    {
        return questionId;
    }
    public void setOptionText(String optionText) 
    {
        this.optionText = optionText;
    }

    public String getOptionText() 
    {
        return optionText;
    }
    public void setResponseCount(Long responseCount) 
    {
        this.responseCount = responseCount;
    }

    public Long getResponseCount() 
    {
        return responseCount;
    }
    public void setPercentage(BigDecimal percentage) 
    {
        this.percentage = percentage;
    }

    public BigDecimal getPercentage() 
    {
        return percentage;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("questionnaireId", getQuestionnaireId())
            .append("questionId", getQuestionId())
            .append("optionText", getOptionText())
            .append("responseCount", getResponseCount())
            .append("percentage", getPercentage())
            .append("createTime", getCreateTime())
            .toString();
    }
}
